#pragma once

#include "stdio.h"
#include <iostream>
#include <String>
#include <fstream>
#include <list>
#include "Tile.h"
using namespace std;

class ParseTiles
{
private:
	char * m_readFile; //directory and file name of source file
	list<Tile> m_tempTiles; //list of tiles
	list<Tile>::iterator tileIter; //list's iterator
	list<Tile>::iterator tileIter2;
	int m_numTiles, m_numAmount;

	ifstream inFile; //file-to-read

	void createTile(int a_tempAmount, string a_tempName, unsigned a_tempFlag, int a_tempRandom);
	void createRandomExits(void);
	void createExits(void);
public:
	// Constructors and Deconstructor
	ParseTiles(void);
	ParseTiles(char* a_readFile);
	~ParseTiles(void);

	// Public Functions
	int getListSize(void);
	bool openFile(void);
	void readData(void);
	void closeFile(void);
	list<Tile> getTileData(void);
	bool checkTiles(void);
	int getNumValidTiles(void);
};